#include<stdio.h>
#include<string.h>

void PrintUnionType()
{
	union Data
	{
		int i;
		float f;
		char  str[20];
	};

	union Data data;

	data.i = 10;
	printf("PrintUnionType data.i:%d \n", data.i);

	data.f = 220.5;
	printf("PrintUnionType data.f:%f \n", data.f);

	strcpy_s(data.str, sizeof("C Programming"),"C Programming");
	printf("PrintUnionType data.str:%s \n", data.str);

	return;
}